package com.example.projectdemo;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.projectdemo.bottomappbar.BABActivity;
import com.example.projectdemo.materialComponents.MaterialButtonActivity;
import com.example.projectdemo.materialComponents.ShapeableImageViewActivity;
import com.example.projectdemo.p1.MainActivity;
import com.example.projectdemo.p2.AnchorActivity;
import com.example.projectdemo.rvrv.RvRvActivity;
import com.example.projectdemo.xfrv.XiFuRv1Activity;
import com.example.projectdemo.xfrv.XiFuRvActivity;
import com.example.projectdemo.xfrv.xf2.Xf2Activity;

import androidx.appcompat.app.AppCompatActivity;

public class NavActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_nav);
    }

    public void onClick(View view) {
        Intent intent = null;
        switch (view.getId()) {
            case R.id.nav1:
                intent = new Intent(NavActivity.this, MainActivity.class);
                break;
            case R.id.nav2:
                intent = new Intent(NavActivity.this, AnchorActivity.class);
                break;
            case R.id.nav3:
                intent = new Intent(NavActivity.this, RvRvActivity.class);
                break;
            case R.id.nav4:
                intent = new Intent(NavActivity.this, XiFuRvActivity.class);
                break;
            case R.id.nav6:
                intent = new Intent(NavActivity.this, Xf2Activity.class);
                break;
            case R.id.nav5:
                intent = new Intent(NavActivity.this, BABActivity.class);
                break;
            case R.id.nav8:
                intent = new Intent(NavActivity.this, XiFuRv1Activity.class);
                break;
            case R.id.nav9:
                intent = new Intent(NavActivity.this, MaterialButtonActivity.class);
                break;
            case R.id.nav10:
                intent = new Intent(NavActivity.this, ShapeableImageViewActivity.class);
                break;
        }
        startActivity(intent);
    }
}